package com.gzh.demo.client;


import com.gzh.demo.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-provider",fallback = UserClientFallback.class)   //声明接口为feign接口
public interface UserClient {
    @GetMapping("/getUserById/{id}")
    User queryById(@PathVariable("id") int id);
}
